/* ===============================
   GLOBAL PDP WRAPPER
   =============================== */
   
   /* =====================================
   FULL-WIDTH PDP (LIKE REFERENCE IMAGE)
   ===================================== */

   html, body {
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {

  .main-image.mobile-swipe img {
    scroll-snap-stop: always;
  }

}

@media (min-width: 1024px) {

  .pdp {
    width: 94vw;
    max-width: none !important;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }

  .product-hero,
  .pdp-details {
    width: 80%;
    max-width: none !important;
    margin: 0 auto;
  }

}



/* MOBILE OVERFLOW FIX */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.pdp {
  font-family: "Inter", Arial, sans-serif;
  background: transparent;
  padding: 0 0 30px; /* remove top space, keep bottom */
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .pdp {
    padding-top: 0;
  }
}


/* ===============================
   PRODUCT HERO
   =============================== */

.product-hero {
  max-width: 1120px; 
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px; 
  align-items: center;
}

.product-hero {
  padding-bottom: 10px; 
  margin-bottom: 0;
}
.pdp-details {
  padding-top: 24px; 
  margin-top: 0;
}


/* ===============================
   PRODUCT MEDIA
   =============================== */

.product-media {
  position: relative;
}

/* IMAGE-TOP BREADCRUMB */
.pdp-top-breadcrumb {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px; /* tight spacing */
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 4px;
}

.pdp-top-breadcrumb a {
  color: #777;
  text-decoration: none;
}

.pdp-top-breadcrumb a:hover {
  color: #111;
}

.pdp-top-breadcrumb span {
  color: #ccc;
}

.pdp-top-breadcrumb .current {
  color: #111;
  font-weight: 500;
}


/* MEDIA GRID */
.media-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: center;
}

/* THUMBNAILS */
.thumbs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thumbs img {
  width: 95px;
  height: 95px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  padding: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.thumbs img.active {
  border-color: #79C046;
  box-shadow: 0 6px 16px rgba(29, 143, 76, 0.4);
}

/* MAIN IMAGE */
.main-image img {
  width: 100%;
  max-width: 650px; /* reduced */
  border-radius: 16px;
}

/* ===============================
   PRODUCT SUMMARY
   =============================== */

.product-summary {
  padding-left: 0; /* removed extra offset */
}

/* PRODUCT TAG */
.product-tag {
  display: inline-block;
  background: #f2f2f2;
  color: #555;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* TITLE */
.product-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 12px;
  color: #111;
}

/* REVIEWS */
.reviews.modern {
  font-size: 14px;
  color: #f5a623;
  margin-bottom: 16px;
}

.reviews.modern span {
  color: #777;
  margin-left: 6px;
}

/* PRICE */
.price.modern {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.price.modern .new {
  font-size: 28px;
  font-weight: 700;
  color: #111;
}

.price.modern .old {
  font-size: 16px;
  color: #aaa;
  text-decoration: line-through;
}

/* DESCRIPTION */
.short-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
  max-width: 420px;
  margin-bottom: 22px;
}

/* ===============================
   SIZE SELECTOR
   =============================== */

.sizes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0;
}

.sizes span {
  font-weight: 600;
}

.sizes button {
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.sizes .active {
  background: #7f8c8d;
  color: #fff;
}

/* ===============================
   CART
   =============================== */

.cart-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  height: 44px;
}

.qty-control input {
  width: 48px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 500;
}

.qty-btn {
  width: 44px;
  height: 100%;
  border: none;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s ease;
}

.qty-btn:hover {
  background: #eaeaea;
}

.qty-btn:active {
  background: #ddd;
}

.add-cart {
  border: none;
  padding: 16px 34px;
  border-radius: 30px;
  background: #79C046;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ===============================
   DETAILS + RELATED
   =============================== */

.pdp-details {
  max-width: 1120px; /* matched to hero */
  margin: 80px auto;
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 40px;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* TABS */
.tabs-area {
  background: #fff;
  padding: 40px;
  border-radius: 18px;
}

.tabs {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
}

.tab {
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  background: #f1f3f6;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: #79C046;
  color: #fff;
}

/* TAB CONTENT */
.tab-content {
  display: none;
  line-height: 1.8;
  color: #666;
}

.tab-content.active {
  display: block;
}

/* ===============================
   RELATED PRODUCTS
   =============================== */

.related-slider {
  background: #fff;
  padding: 30px;
  border-radius: 18px;
}

.slider-wrapper {
  position: relative;
  overflow: hidden;
}

.slider {
  display: flex;
  gap: 18px;
  overflow: visible;
}

.slide {
  min-width: calc(50% - 9px);
  background: #fafafa;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.slide img {
  width: 100%;
  border-radius: 12px;
}

.slide span {
  color: #79C046;
  font-weight: 700;
}

/* ARROWS */
.arrow {
  position: absolute;
  top: 40%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #fff;
  cursor: pointer;
}

.arrow.left { left: 10px; }
.arrow.right { right: 10px; }

.arrow {
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  z-index: 10;
}


/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 900px) {
  .product-hero,
  .pdp-details {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   MOBILE
   =============================== */

@media (max-width: 768px) {

  .media-grid {
    grid-template-columns: 1fr;
  }

  .main-image {
    order: 1;
    width: 325px;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tab[data-tab="reviews"] {
    grid-column: span 2;
  }

  .slide {
    min-width: 100%;
  }

  .arrow {
    top: 45%;
  }

  .tabs-area,
  .related-slider {
    padding: 20px;
  }

  .product-title {
    font-size: 28px;
  }

  .price.modern .new {
    font-size: 22px;
  }

  .thumbs {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 16px;

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    padding: 4px 4px 8px;
  }

  .thumbs img {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 4px;
    scroll-snap-align: start;
  }

  /* Hide scrollbar */
  .thumbs::-webkit-scrollbar {
    display: none;
  }
}

/* ===============================
   MOBILE SWIPE THUMBNAILS
   =============================== */

@media (max-width: 768px) {
    .main-image {
    order: 1;
    max-width: 350px;
    padding: auto;
  }

  .thumbs-wrapper {
    order: 2;
    width: 100%;
    margin-top: 16px;
  }

  .thumbs {
    display: flex;
    gap: 12px;
    padding: 6px 4px 10px;

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .thumbs img {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    padding: 4px;
    scroll-snap-align: start;
  }

  .thumbs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 768px) {
  .thumbs::after {
    content: "← swipe →";
    font-size: 11px;
    color: #aaa;
    position: absolute;
    right: 8px;
    bottom: -16px;
  }
}

@media (max-width: 768px) {

  /* Hide thumbs on mobile */
  .thumbs-wrapper {
    display: none !important;
  }

  /* Enable swipe on main image */
  .main-image.mobile-swipe {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    scroll-behavior: smooth;
  }

  .main-image.mobile-swipe img {
    width: 100%;
    max-width: 360px;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 16px;
  }

  .main-image.mobile-swipe::-webkit-scrollbar {
    display: none;
  }
}

/* ===============================
   DESKTOP: SINGLE MAIN IMAGE ONLY
   =============================== */
@media (min-width: 769px) {

  .main-image {
    position: relative;
  }

  .main-image img {
    display: none;
  }

  .main-image img.active {
    display: block;
  }
}

/* ===============================
   CLEAN MOBILE MAIN IMAGE SWIPE
   =============================== */

@media (max-width: 768px) {

  html, body {
    overflow-x: hidden;
  }

  /* Hide thumbnails entirely */
  .thumbs-wrapper {
    display: none !important;
  }

  /* Main image swipe */
  .main-image.mobile-swipe {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .main-image.mobile-swipe img {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 16px;
  }

  .main-image.mobile-swipe::-webkit-scrollbar {
    display: none;
  }

  /* Fix description & related cut */
  .tabs-area,
  .related-slider {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
}

/* ===============================
   MOBILE SWIPE DOTS
   =============================== */

@media (max-width: 768px) {

  .swipe-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
  }

  .swipe-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s ease;
  }

  .swipe-dots span.active {
    background: #053027;
  }
}

/* Reduce space before footer */
.pdp-details {
  margin-bottom: 32px !important;
}
/* Ensure last section doesn't push footer */
.pdp-details:last-child {
  padding-bottom: 0;
}
@media (max-width: 768px) {
  .pdp-details {
    margin-bottom: 16px !important;
  }
}
/* FORCE footer closer to content */
.footer {
  margin-top: 0 !important;
  padding-top: 24px !important;
}

.footer .footer-top {
  margin-top: 0 !important;
  padding-top: 24px !important;
}
/* Remove phantom space before footer */
body > *:last-child:not(footer) {
  margin-bottom: 0 !important;
}

main .container {
    width: 80%;
    max-width: 80%; 
    margin: 0 auto;
    margin-bottom: 0%;
    padding-bottom: 0%;
}

/* =========================
   COLOR SELECT (PDP)
========================= */
.colors {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.colors label {
  font-size: 14px;
  font-weight: 600;
  color: #053027;
}

.color-select {
  padding: 12px 16px;
  border-radius: 30px;
  border: 1px solid #e0e0e0;
  background: #f0f0f0;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  color: #053027;
}

/* Focus state (brand color) */
.color-select:focus {
  border-color: #79C046;
  box-shadow: 0 0 0 2px rgba(121, 192, 70, 0.25);
}


/* =========================/* =========================
   SUCCESS TOAST (MODERN)
========================= */
.toast {
   position: fixed;
  top: 80%; /* ⬅️ pushes it slightly down */
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 14px;

  background: #ffffff;
  color: #333;

  padding: 16px 20px;
  border-radius: 999px;

  min-width: 280px;
  max-width: 90%;

  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;

  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Icon */
.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #79C046;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}

/* Text */
.toast-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #79C046;
}

.toast-text {
  font-size: 13px;
  color: #000000;
}

/* Close button */
.toast-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #aaa;
  cursor: pointer;
  margin-left: 6px;
  line-height: 1;
}

.toast-close:hover {
  color: #333;
}


/* =================================================
   FINAL PDP MOBILE FIX — PREVENT LEFT CUT
   Affects ONLY Details + Related section
   ================================================= */

@media (max-width: 768px) {

  /* Lock PDP details to viewport */
  .pdp-details {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Tabs & related containers */
  .tabs-area,
  .related-slider {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Slider must scroll, never push layout */
  .slider-wrapper {
    width: 100%;
    overflow-x: hidden;
  }

  .slider {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Slides must never exceed screen */
  .slide {
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Keep arrows inside screen */
  .arrow.left {
    left: 8px;
  }

  .arrow.right {
    right: 8px;
  }
}

/* =========================================
   PDP HERO MOBILE SPACING FIX
   Centers product hero without breaking layout
   ========================================= */
@media (max-width: 768px) {

  .product-hero {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

}

/* =========================================
   REMOVE EXTRA TOP GAP UNDER NAV (MOBILE)
   ========================================= */
@media (max-width: 768px) {

  main,
  .pdp {
    padding-top: 10px !important;
    margin-top: 0 !important;
  }

}
